oracle.pgx.api

## Class Pgx

- java.lang.Object
- - oracle.pgx.api.Pgx

-     public final class Pgx
      extends Object

  Main entry point for PGX applications.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `EMBEDDED_URL` constant indicating this URL refers to an embedded PGX instance.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Pgx()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Control` | `createControl(String baseUrl)` Deprecated.
    `static PgxSession` | `createSession(String source)`
    `static PgxSession` | `createSession(String baseUrl, String source)`
    `static String` | `getDefaultUrl()` The default url is set by default to `EMBEDDED_URL`.
    `static ServerInstance` | `getInstance()` Get a handle to a PGX instance using `getDefaultUrl()`.
    `static ServerInstance` | `getInstance(ClientConfig config)`
    `static ServerInstance` | `getInstance(String baseUrl)` Get a handle to a PGX instance.
    `static ServerInstance` | `getInstance(String baseUrl, int prefetchSize, int uploadBatchSize, int remoteFutureTimeout)` Get a handle to a PGX instance.
    `static void` | `setDefaultUrl(String url)` set the default base url used by invocations of `getCore()`.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EMBEDDED_URL

          public static final String EMBEDDED_URL

      constant indicating this URL refers to an embedded PGX instance.

  - ### Constructor Detail

    - #### Pgx

          public Pgx()

  - ### Method Detail

    - #### createControl

          @Deprecated
          public static Control createControl(String baseUrl)

      Deprecated.

    - #### createSession

          public static PgxSession createSession(String source)
                                          throws ExecutionException,
                                                 InterruptedException

      Throws:
        `ExecutionException`
        `InterruptedException`

    - #### createSession

          public static PgxSession createSession(String baseUrl,
                                 String source)
                                          throws ExecutionException,
                                                 InterruptedException

      Throws:
        `ExecutionException`
        `InterruptedException`

    - #### getDefaultUrl

          public static String getDefaultUrl()

      The default url is set by default to `EMBEDDED_URL`. You can overwrite the *default* default url by setting the -DpgxDefaultUrl system property.
      Returns:
        the currently set default url.

    - #### getInstance

          public static ServerInstance getInstance()

      Get a handle to a PGX instance using `getDefaultUrl()`.
      Returns:
        the `ServerInstance` instance

    - #### getInstance

          public static ServerInstance getInstance(ClientConfig config)

    - #### getInstance

          public static ServerInstance getInstance(String baseUrl)

      Get a handle to a PGX instance.
      Parameters:
        `baseUrl` - base url pointing to a PGX server instance, e.g. myhost:7000/pgx
      Returns:
        the `ServerInstance` instance

    - #### getInstance

          public static ServerInstance getInstance(String baseUrl,
                                   int prefetchSize,
                                   int uploadBatchSize,
                                   int remoteFutureTimeout)

      Get a handle to a PGX instance.
      Parameters:
        `baseUrl` - base url pointing to a PGX server instance, e.g. myhost:7000/pgx
        `prefetchSize` - how many elements to pre-fetch from the server, e.g. when iterating over a collection
        `uploadBatchSize` - how many elements to upload during one batch, e.g. when adding elements to a collection
        `remoteFutureTimeout` - How long GET requests waiting for futures to complete will be alive before time out. Time in milliseconds, set to zero for an infinite timeout. See HTTP Client `SO_TIMEOUT` for more details.
      Returns:
        the `ServerInstance` instance

    - #### setDefaultUrl

          public static void setDefaultUrl(String url)

      set the default base url used by invocations of `getCore()`. The new default url affects sub-sequent calls of `getCore()`.
      Parameters:
        `url` - default url

Copyright © 2015. All rights reserved.